package com.minivision.fdiot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.bus.jackson.RemoteApplicationEventScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.data.redis.core.RedisKeyValueAdapter.EnableKeyspaceEvents;
import org.springframework.data.redis.repository.configuration.EnableRedisRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableJpaRepositories(basePackages = "com.minivision.fdiot.repository.mysql")
//Redis Repositories requires at least Redis Server version 2.8.0
@EnableRedisRepositories(basePackages = "com.minivision.fdiot.repository.redis", enableKeyspaceEvents = EnableKeyspaceEvents.ON_STARTUP)
@EnableJpaAuditing
@EnableScheduling
@EnableCaching
@RemoteApplicationEventScan("com.minivision.bus.event")
@EnableDiscoveryClient
public class App {
  public static void main(String[] args) {
	SpringApplication.run(App.class, args);
  }
}
